<?php get_header(); 
/**
 * @package WordPress
 * @subpackage Webbdesign
 */
 ?>
<div id="content">
<div id="top"> </div>
<?php get_sidebar(); ?>
<div id="main">
  <div <?php post_class() ?>>
  <?php if (have_posts()) : ?>
  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  <?php /* If this is a category archive */ if (is_category()) { ?>
  <h2 class="pagetitle"><?php printf(__('Archive for the &#8216;%1$s&#8217; Category'), single_cat_title('',false)); ?></h2>
  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  <h2 class="pagetitle"><?php printf(__('Archive for %1$s'), get_the_time(__('F jS, Y'))); ?></h2>
  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  <h2 class="pagetitle"><?php printf(__('Archive for %1$s'), get_the_time(__('F, Y'))); ?></h2>
  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  <h2 class="pagetitle"><?php printf(__('Archive for %1$s'), get_the_time('Y')); ?></h2>
    <?php /* If this is a tag archive */ } elseif (is_tag()) { ?>
  <h2 class="pagetitle"><?php printf(__('Archive for %1$s'), single_tag_title('', false) ); ?></h2>
 <?php /* If this is a search */ } elseif (is_search()) { ?>
  <h2 class="pagetitle">
    <?php _e('Search Results'); ?>
  </h2>
  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  <h2 class="pagetitle">
    <?php _e('Author Archive'); ?>
  </h2>
  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    <h2 class="pagetitle">
      <?php _e('Blog Archives'); ?>
    </h2>
    <?php } ?>

      <div class="entry">
<ul>  <?php while (have_posts()) : the_post(); ?>

      <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %1$s'), the_title('', '', false)); ?>">
        <?php the_title(); ?>
        </a> -
        <?php the_time('j F Y') ?>
        - <?php echo $post->comment_count ?> comments</li>
      <?php endwhile; ?>
</ul></div>
  </div>
  <p class="navigation">
   <span class="previous">
      <?php next_posts_link(__('&laquo; Previous Entries')) ?>
    </span>
    <span class="next">
      <?php previous_posts_link(__('Next Entries &raquo;')) ?>
    </span>
  </p>
  <?php else : ?>
  <h2 class="center">
    <?php _e('Not Found'); ?>
  </h2>
  <?php include (TEMPLATEPATH . '/searchform.php'); ?>
  <?php endif; ?>
</div>
<div id="bottom"> </div>
<?php get_footer(); ?>
